import request from '@/utils/request'
import { exportRequest } from '@/utils/exportRequest'

// 新增角色
export function addRole(data = {}) {
  return request.post('/system/role/add', data)
}

// 编辑角色
export function editRole(data = {}) {
  return request.post('/system/role/edit', data)
}

// 删除角色
export function deleteRole(data = {}) {
  return request.post('/system/role/delete', data)
}

// 角色列表 分页
export function getRoleList(data = {}) {
  return request.post('/system/role/page', data)
}

// 角色列表 不分页
export function getAllRoleList(data = {}) {
  return request.post('/system/role/list', data)
}

// 角色详情
export function getRoleDetail(data = {}) {
  return request.post('/system/role/detail', data)
}

// 所有菜单列表
export function getMenuList(data = {}) {
  return request.post('/system/menu/list', data)
}

// 所有我的菜单列表
export function getMyMenuList(data = {}) {
  return request.post('/system/menu/myList', data)
}

// 新增员工
export function addUser(data = {}) {
  return request.post('/system/user/add', data)
}

// 编辑员工
export function editUser(data = {}) {
  return request.post('/system/user/edit', data)
}

// 删除员工
export function deleteUser(data = {}) {
  return request.post('/system/user/delete', data)
}

// 员工审核权限
export function addUserApprove(data = {}) {
  return request.post('/system/user/approve', data)
}

// 员工列表
export function getUserList(data = {}) {
  return request.post('/system/user/page', data)
}

// 员工列表导出
export function exportUserList(data = {}) {
  return exportRequest('post', '/system/user/export', data)
}

// 员工详情
export function getUserDetail(data = {}) {
  return request.post('/system/user/detail', data)
}

// 修改员工状态
export function editStatus(data = {}) {
  return request.post('/system/user/editStatus', data)
}

// 修改员工密码
export function editPass(data = {}) {
  return request.post('/system/user/editPass', data)
}

// 新增部门
export function addDept(data = {}) {
  return request.post('/system/dept/add', data)
}

// 编辑部门
export function editDept(data = {}) {
  return request.post('/system/dept/edit', data)
}

// 删除部门
export function deleteDept(data = {}) {
  return request.post('/system/dept/delete', data)
}

// 部门详情
export function getDeptDetail(data = {}) {
  return request.post('/system/dept/detail', data)
}

// 部门列表
export function getDeptList(data = {}) {
  return request.post('/system/dept/list', data)
}

// 部门导出
export function exportDeptList(data = {}) {
  return exportRequest('post', '/system/dept/export', data)
}

